﻿using System;
using System.Web;
using System.Data;
using System.Collections;
using System.Web.Services;
using System.Web.Services.Protocols;

/// <summary>
/// WebServiceSoso 的摘要说明
/// </summary>
[WebService(Namespace = "http://bysoso.cn/")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
public class WebServiceSoso : System.Web.Services.WebService {
   
    Tong.TongUse TextData = new Tong.TongUse();
   


    private System.Windows.Forms.ProgressBar progressBar1;

    public WebServiceSoso () {

        //如果使用设计的组件，请取消注释以下行 
        InitializeComponent(); 
    }

    /// <summary>
    /// 传入SQL得到执行后的DataSet
    /// </summary>
    /// <param name="sql">sql</param>
    /// <param name="pwd">执行密码</param>
    /// <returns></returns>
    [WebMethod]
    public DataSet SqlDataSet(string sql语句,string 调用密码)
    {
        DataSet MyDs = new DataSet();

        if (sql语句.ToUpper().IndexOf("update") == -1 && sql语句.ToUpper().IndexOf("delete") == -1 && sql语句 != "")
        {
            if (调用密码 == "css")//验证密码
            {
                return TextData.SqlataSet(sql语句);
            }
        }
        return MyDs;
        
    }

    /// <summary>
    /// 站点设计常用方法
    /// </summary>
    [WebMethod]
    public Tong.ThisSiteUse.SiteTong TextThisSite()
    {
        Tong.ThisSiteUse.SiteTong cc = new Tong.ThisSiteUse.SiteTong();
        return cc;
    }



    private void InitializeComponent()
    {
        this.progressBar1 = new System.Windows.Forms.ProgressBar();
        // 
        // progressBar1
        // 
        this.progressBar1.Location = new System.Drawing.Point(0, 0);
        this.progressBar1.Name = "progressBar1";
        this.progressBar1.Size = new System.Drawing.Size(100, 23);
        this.progressBar1.TabIndex = 0;

    }


    
}

